Improve initialization in the core chart#156
Merged
jacekn merged 1 commit intostellar:mainfrom Mar 12, 2026
Merged
Conversation
This pull request will improve the way we initialize core. After the change new-db will only run if no schema is present. This is a slight behaviour change but it's safer than the existing one. Other that being safer the new version is a drop-in replacement that doesn't require operators to take any action. The new method also allows operators to customize how core is initialized and also allows for handling of history archives.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the core Helm chart initialization flow so database setup/migrations happen via a configurable init script, aiming to avoid running new-db when a schema already exists and enabling optional history-archive initialization.
Changes:
- Add
.Values.core.initScriptand mount/execute it via a new init-scripts ConfigMap and initContainer. - Replace the previous
new-dbinitContainer args with an init script that attemptsupgrade-dband falls back tonew-db. - Bump chart version from
0.5.0to0.6.0.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| charts/core/values.yaml | Introduces a configurable init script and default DB init/upgrade logic. |
| charts/core/templates/core-sts.yaml | Switches initContainer to execute the mounted init script and adds the init-scripts volume. |
| charts/core/templates/core-init-scripts-cm.yaml | Adds a ConfigMap to deliver init.sh from values into the pod. |
| charts/core/Chart.yaml | Increments chart version to reflect the behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request will improve the way we initialize core. After the change new-db will only run if no schema is present. This is a slight behaviour change but it's safer than the existing one. Other that being safer the new version is a drop-in replacement that doesn't require operators to take any action.
The new method also allows operators to customize how core is initialized and also allows for handling of history archives.